package com.first.config.druid;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 
 * @描述: 只提供了常用的属性，如果有需要，自己添加 .
 * @作者: Wnj .
 * @创建时间: 2017年6月20日 .
 * @版本: 1.0 .
 */
@Component
@PropertySource("classpath:druid-config.properties")
@ConfigurationProperties(prefix = "spring.druid.datasource")
//@ConfigurationProperties(prefix = "spring.druid.datasource")
public class DruidProperties {
	   private String type;
	    private String driverClassName;
	    private String url;
	    private String username;
	    private String password;
	    private Integer initialSize;
	    private Integer minIdle;
	    private Integer maxActive;
	    private Long maxWait;
	    private Long timeBetweenEvictionRunsMillis;
	    private Long minEvictableIdleTimeMillis;
	    private String validationQuery;
	    private boolean testWhileIdle;
	    private boolean testOnBorrow;
	    private boolean testOnReturn;
	    private boolean poolPreparedStatements;
	    private Integer maxPoolPreparedStatementPerConnectionSize;
	    private String filters;
	    private String connectionProperties;
	    private boolean useGlobalDataSourceStat;
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public String getDriverClassName() {
			return driverClassName;
		}
		public void setDriverClassName(String driverClassName) {
			this.driverClassName = driverClassName;
		}
		public String getUrl() {
			return url;
		}
		public void setUrl(String url) {
			this.url = url;
		}
		public String getUsername() {
			return username;
		}
		public void setUsername(String username) {
			this.username = username;
		}
		public String getPassword() {
			return password;
		}
		public void setPassword(String password) {
			this.password = password;
		}
		public Integer getInitialSize() {
			return initialSize;
		}
		public void setInitialSize(Integer initialSize) {
			this.initialSize = initialSize;
		}
		public Integer getMinIdle() {
			return minIdle;
		}
		public void setMinIdle(Integer minIdle) {
			this.minIdle = minIdle;
		}
		public Integer getMaxActive() {
			return maxActive;
		}
		public void setMaxActive(Integer maxActive) {
			this.maxActive = maxActive;
		}
		public Long getMaxWait() {
			return maxWait;
		}
		public void setMaxWait(Long maxWait) {
			this.maxWait = maxWait;
		}
		public Long getTimeBetweenEvictionRunsMillis() {
			return timeBetweenEvictionRunsMillis;
		}
		public void setTimeBetweenEvictionRunsMillis(Long timeBetweenEvictionRunsMillis) {
			this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
		}
		public Long getMinEvictableIdleTimeMillis() {
			return minEvictableIdleTimeMillis;
		}
		public void setMinEvictableIdleTimeMillis(Long minEvictableIdleTimeMillis) {
			this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
		}
		public String getValidationQuery() {
			return validationQuery;
		}
		public void setValidationQuery(String validationQuery) {
			this.validationQuery = validationQuery;
		}
		public boolean isTestWhileIdle() {
			return testWhileIdle;
		}
		public void setTestWhileIdle(boolean testWhileIdle) {
			this.testWhileIdle = testWhileIdle;
		}
		public boolean isTestOnBorrow() {
			return testOnBorrow;
		}
		public void setTestOnBorrow(boolean testOnBorrow) {
			this.testOnBorrow = testOnBorrow;
		}
		public boolean isTestOnReturn() {
			return testOnReturn;
		}
		public void setTestOnReturn(boolean testOnReturn) {
			this.testOnReturn = testOnReturn;
		}
		public boolean isPoolPreparedStatements() {
			return poolPreparedStatements;
		}
		public void setPoolPreparedStatements(boolean poolPreparedStatements) {
			this.poolPreparedStatements = poolPreparedStatements;
		}
		public Integer getMaxPoolPreparedStatementPerConnectionSize() {
			return maxPoolPreparedStatementPerConnectionSize;
		}
		public void setMaxPoolPreparedStatementPerConnectionSize(Integer maxPoolPreparedStatementPerConnectionSize) {
			this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
		}
		public String getFilters() {
			return filters;
		}
		public void setFilters(String filters) {
			this.filters = filters;
		}
		public String getConnectionProperties() {
			return connectionProperties;
		}
		public void setConnectionProperties(String connectionProperties) {
			this.connectionProperties = connectionProperties;
		}
		public boolean isUseGlobalDataSourceStat() {
			return useGlobalDataSourceStat;
		}
		public void setUseGlobalDataSourceStat(boolean useGlobalDataSourceStat) {
			this.useGlobalDataSourceStat = useGlobalDataSourceStat;
		}
   
	    
	    
	    
}
